package sconf

import "xin-job/core/conf"

var ServerConf = &ServerConfig{}

type ServerConfig struct {
	AppName          string
	Port             int
	AdminAddressList []string // 调度中心管理端地址
	AccessToken      string   // accessToken
	Timeout          int      // http timeout second
}

func (cc *ServerConfig) Read() error {
	var c = conf.C{
		ConfigName: "xin-job-client",
		ConfigType: "toml",
		ConfigPath: ".",
	}

	err := c.Read(cc)
	return err
}
